package com.mall.server.controller.ums;

import com.mall.model.domain.UmsMemberLevel;
import com.mall.model.vo.CommonResult;
import com.mall.server.service.ums.UmsMemberLevelService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;


@CrossOrigin
@RestController
@RequestMapping("/memberLevel")
public class UmsMemberLevelController {


    @Autowired
    private UmsMemberLevelService memberLevelService;

    @GetMapping("/list")
    public CommonResult listByDefault(Integer defaultStatus){
        List<UmsMemberLevel> list=memberLevelService.listByDefault(defaultStatus);
        return CommonResult.success(list);
    }
}

